<template>
  <view class="about-container">
    <view class="header-section text-center">
      <image style="width: 150rpx;height: 150rpx;" src="/static/logo200.png" mode="widthFix"></image>
    </view>

    <view class="content-section" v-for="(list, key) of profitRatioMap" :key="key">
	  <uni-title type="h2" :title="'客源渠道('+key+')'" style="margin-left: 35rpx;"></uni-title>
      <view class="menu-list" v-for="(item,index) in list">
        <view class="list-cell list-cell-arrow">
          <view class="menu-item-box">
            <view style="font-size: 16px;">
				{{item.paymentWayName}}({{item.paymentWay}})
			</view>
            <view class="text-right" style="color: darkorange;font-size: 26px;">{{item.earningRate}}%</view>
          </view>
        </view>
      </view>
    </view>

    <view class="copyright">
      <view>&nbsp;</view>
    </view>
  </view>
</template>

<script>
import config from '@/config.js'
import { myProfitList } from "@/api/seller/profit"

export default {
    data() {
        return {
            channelList: [],
            profitRatioMap: {}
        }
    },
    onShow() {
        this.getProfitList();
    },
    methods: {
        // 页面数据
        getProfitList() {
            let params = {};
            myProfitList(params).then(res=> {
                this.profitRatioMap = res.data;
				console.log(JSON.stringify(this.profitRatioMap))
            })
        }
    }
}
</script>

<style lang="scss">
  page {
    background-color: #f8f8f8;
  }

  .copyright {
    margin-top: 50rpx;
    text-align: center;
    line-height: 60rpx;
    color: #999;
  }

  .header-section {
    display: flex;
    padding: 30rpx 0 0;
    flex-direction: column;
    align-items: center;
  }
</style>
